<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Consultar Servicio</title>
<link rel="stylesheet" type="text/css" href="/TallerMecanico/common/css/estilo.css" />
<script src="/TallerMecanico/common/jquery/jquery-1.10.2.js"></script>
<script src="/TallerMecanico/common/js/jquery.Rut.js"></script>
<script src="/TallerMecanico/common/js/jquery.validate.js"></script>
<script type="text/javascript">
	function validar() {
		document.getElementById("formulario").action = "consultarServicios.do";
		document.getElementById("formulario").submit();
	}
	$(document).ready(function(){
	
	
	$("#formulario").validate({
		rules : {
			nombre_consultar : {required : true,minlength : 3},
		},
		messages : {
			nombre_consultar : "Debe Intruducir el nombre del servicio",
		},
		submitHandler : function(form) {
			document.getElementById("formulario").action = "consultarServicios.do";
			document.getElementById("formulario").submit();
		}
	});
	
	});
</script>
</head>
<body>
	<h1>Consultar Servicio</h1>
	<form name="formulario" id="formulario" method="post">
		<input type="hidden" id="metodo" name="metodo" value="consultar">
		<input type="text" id="nombre_consultar" name="nombre_consultar"/>
		<input type="button" value="Consultar" onclick="validar()"/>
	</form>
</body>
</html>